package com.example.star.service;

import com.example.star.entity.Post;
import com.example.star.mapper.PostMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class PostService {
    @Autowired
    private PostMapper postMapper;

    public List<Post> getAllPosts() {
        return postMapper.getAllPosts();
    }

    public void addPost(Post post) {
        postMapper.addPost(post);
    }
}
